package org.summerframework.web.view;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;

import java.util.Arrays;
import java.util.HashSet;

/**
 * @author 石超
 * @version v1.0.0
 */
public class DefaultMappingJackson2JsonView extends MappingJackson2JsonView {
    {
        setModelKeys(new HashSet<>(Arrays.asList("resultDTO", "result")));
        setExtractValueFromSingleKeyModel(true);
    }

    public DefaultMappingJackson2JsonView() {
        super();
    }

    public DefaultMappingJackson2JsonView(ObjectMapper objectMapper) {
        super(objectMapper);
    }
}
